<template>
  <div class="loadMoreList">
    <div
        class="trainingItem"
        v-for="tr in trainingStore.contentList"
        :key="tr.id"
    >
      <div>
        <img
            style="width: 170px;height: 100px"
            :src="tr.cover"
            alt="">
      </div>
      <div class="mainText">
        <div class="title">{{ tr.planName }}</div>
        <div class="time">已练习0次0分钟</div>
      </div>
      <div class="status">
        <svg t="1663656459047" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
             p-id="5815" width="30" height="30">
          <path
              d="M395.765333 586.570667h-171.733333c-22.421333 0-37.888-22.442667-29.909333-43.381334L364.768 95.274667A32 32 0 0 1 394.666667 74.666667h287.957333c22.72 0 38.208 23.018667 29.632 44.064l-99.36 243.882666h187.050667c27.509333 0 42.186667 32.426667 24.042666 53.098667l-458.602666 522.56c-22.293333 25.408-63.626667 3.392-54.976-29.28l85.354666-322.421333zM416.714667 138.666667L270.453333 522.581333h166.869334a32 32 0 0 1 30.933333 40.181334l-61.130667 230.954666 322.176-367.114666H565.312c-22.72 0-38.208-23.018667-29.632-44.064l99.36-243.882667H416.714667z"
              p-id="5816" fill="#d4237a"></path>
        </svg>
        <div class="detail-light">进行中</div>
      </div>
    </div>
  </div>
</template>


<script setup lang="ts">
import {useTrainingStore} from "@/store/training/index"
import {onMounted} from "vue";

const trainingStore = useTrainingStore()
onMounted(() => {
  trainingStore.getTrainingList()
})
</script>

<style scoped>
.loadMoreList::after {
  content: '';
  display: block;
  clear: both;
}

.loadMoreList {
  -webkit-box-pack: start;
  margin-left: auto;
  margin-right: auto;
}

.trainingItem {
  width: 900px;
  cursor: pointer;
  box-sizing: border-box;
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e3e3e3;
  display: flex;
  -webkit-box-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  align-items: center;
}
</style>
